<template lang="">
 <div>
    <ul>
      <li v-for="(item,index) in list" :key="item.id">
        <input type="checkbox" v-model="item.checked">
        {{item.name}} 
        <button @click="del(index)">删除</button>
      </li>
    </ul>
 </div>
</template>
<script>
export default {
  name: "Middle",
  props: ["list"],
  methods: {
    del(index) {
      this.$emit("del", index);
    }
  },
};
